import service from "@/components/js/service";


export const BaseApi = {
    methods: {
        getBaseUrl() {
            return "/";
        },
        save(params) {
            return service.put(this.getBaseUrl(), params);
        },
        deleteById(id) {
            return service.delete(this.getBaseUrl() + "/" + id);
        },
        delete(params) {
            return service.delete(this.getBaseUrl(), params);
        },
        get(id) {
            return service.get(this.getBaseUrl() + "/" + id);
        },
        findPage(param) {
            return service.post(this.getBaseUrl() + "/pageList", param);
        },
        getAll() {
            return service.get(this.getBaseUrl() + "/all");
        }
    },

}
